package com.woniuxy.movie.commons.web.config;


import com.woniuxy.movie.commons.ribbon.config.RibbonBaseConfig;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

@Configuration
@RibbonClients(defaultConfiguration = RibbonBaseConfig.class)
public class WebBaseConfig {
    /*
    * 集成服务发现
    * */
    @LoadBalanced
    @Bean
    public RestTemplate creatRestTemplate(){
        return new RestTemplate();
    }
}
